import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../pages/Home'
import User from '../pages/User'
import Order from '../pages/Order'
import pageOne from '../pages/pageOne'
import pageTwo from '../pages/pageTwo'

import Main from '../pages/Main'
Vue.use(VueRouter)

const routes = [
    {
        path:'/',
        component:Main,
        redirect:'/home',
        children:[
            {
                path:'home',
                component:Home
            },
            {
                path:'user',
                component:User
            },
            {
                path:'order',
                component:Order
            },
            {
                path:'page1',
                component:pageOne
            },
            {
                path:'page2',
                component:pageTwo
            },
        ]
    },
    
]


const router = new VueRouter({
    routes
})
export default router